<%@ page import="java.io.*" %>
<%
response.addDateHeader("Expires",0) ;
request.setCharacterEncoding("GBK");
out.clear() ;
response.setContentType((String)session.getAttribute("contentType"));
String saveFlg=session.getAttribute("attachsaveFlg")!=null?(String)session.getAttribute("attachsaveFlg"):"";

if("1".equals(saveFlg)){
    String exactName=".doc";
    String header="attachment; filename=\""+(String)session.getAttribute("filename")+"\"";
    response.setHeader("Content-Disposition","attachment; filename=\"\u6D4B\u8BD5"+exactName+"\"");
}
        byte[] o =(byte[])session.getAttribute("attachData");
        session.setAttribute("attachData",null);
        ServletOutputStream streamOut = response.getOutputStream();
        streamOut.write(o);
        streamOut.close();

%>
